<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>学校在线考试系统</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.css" rel="stylesheet">
	<link href="css/bootstrap-table.css" rel="stylesheet">
	<link href="css/mystyle.css" rel="stylesheet">
	<link href="css/test.css" rel="stylesheet">
	<link href="css/bootstrap-select.min.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link href="css/font-awesome.min.css" rel="stylesheet">
</head>
<body onbeforeunload="return leavePage()">
	<nav class="navbar navbar-default" role="navigation" style="margin-bottom:0;">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse"
						data-target="#example-navbar-collapse">
					<span class="sr-only">切换导航</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<div class="navbar-brand">学校在线考试系统 -- 教师端</div>
			</div>
			<div class="collapse navbar-collapse" id="example-navbar-collapse">
				<ul class="nav navbar-nav navbar-right" >
					<li class="navbar-text">教师:<%-- <%=teacher.getName() %> --%></li>
					<li><a href="/exam/teacher/logout"><span class="fa fa-sign-out"></span>注销</a></li>
				</ul>
			</div>
	</nav>
	
	<div class="container-fluid" style="padding:0;">
		<div class="col-sm-2" style="padding:0;">
			<ul class="list-group">
				<a class="list-group-item" style="border-radius:0px;" href="tch_index.jsp">首页</a>
				<a class="list-group-item" data-toggle="collapse" data-parent="#accordion" 
					href="#collapseThree">
					题库管理<span class="fa fa-angle-right" style="float:right;font-size:25px;"></span>
				</a>
				<div id="collapseThree" class="panel-collapse collapse">
					<ul class="list-group" style="margin-bottom:0;">
						<a href="tch_single.jsp" class="list-group-item" style="padding-left:40px;border-radius:0px;" >单选题</a>
						<a href="tch_multiple.jsp" class="list-group-item" style="padding-left:40px;">多选题</a>
						<a href="tch_judgment.jsp" class="list-group-item" style="padding-left:40px;">判断题</a>
						<a href="#" class="list-group-item" style="padding-left:40px;">填空题</a>
						<a href="#" class="list-group-item" style="padding-left:40px;">解答题</a>
					</ul>
				</div>
				<a href="tch_paper.jsp" class="list-group-item  active" data-toggle="tab">试卷管理</a>
			</ul>
		</div>
		<div class="col-sm-10">
		
			<!-- 面包屑导航 -->
			<ol class="breadcrumb">
			    <li><a href="tch_index.jsp">首页</a></li>
			    <li><a href="tch_paper.jsp">试卷</a></li>
			    <li class="active">组卷</li>
			</ol>
			<div class="container">
				
				<!-- 是否提交离开页面的标志 -->
				<input type="hidden" id="submit_flag" value=0>
				
				<form id="form1" class="form-horizontal" role="form" method="post">
					<div class="form-group">
						<label class="col-sm-1 control-label">标题</label>
						<div class="col-sm-10">
							<input class="form-control" name="title" required="required" placeholder="标题">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">描述</label>
						<div class="col-sm-10">
							<input class="form-control" name="description" placeholder="描述">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">考试时长</label>
						<div class="col-sm-5">
							<input class="form-control" name="time" required="required" placeholder="考试时长">
						</div>
						<label for="name" class="col-sm-1 control-label">科目</label>
						<div class="col-sm-5">
							
							 <select name="subjectId" id="slpk" class="selectpicker" data-live-search="true"></select>  
							 
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">试卷类型</label>
						<div class="col-sm-10">
							<label><input type="radio" name="paperType" value="Exercise" required>练习卷</label>
							<label><input type="radio" name="paperType" value="Simulation">模拟卷</label>
							<label><input type="radio" name="paperType" value="Formal">正式卷</label>
						</div>
					</div>
					
					<div id="topicContainer">
						
					</div>
					
					<a class="btn btn-default col-sm-11" onclick="addTopic()" style="margin-top:10px;"><span class="fa fa-plus"></span>添加大题</a>
					
					<div class="form-group">
						<button type="submit" value="Submit" class="btn btn-success pull-right" style="margin-top:30px;margin-right:110px;">提交</button>
					</div>
					
				</form>
			</div>
		</div>
		<div class="col-sm-10 col-md-8 col-lg-6">
			<!-- 自定义的编辑试卷组件 -->
			<div class="btn-toolbar edit-paper-toolbar" role="toolbar">
				<div class="btn-group">
				    <button type="button" class="btn btn-default">单选题</button>
				    <button type="button" class="btn btn-default">多选题</button>
				    <button type="button" class="btn btn-default">判断题</button>
				    <button type="button" class="btn btn-default">填空题</button>
				    <button type="button" class="btn btn-default">解答题</button>
				    <button type="button" class="btn btn-default">综合题</button>
				 </div>
				<div class="btn-group">
				    <button type="button" class="btn btn-default"><span class="fa fa-image">&nbsp;</span>图片</button>
				    <button type="button" class="btn btn-default"><span class="fa fa-th">&nbsp;</span>表格</button>
				    <button type="button" class="btn btn-default"><span class="fa fa-trash">&nbsp;</span>删除</button>
				</div>
			</div>
		</div>
	</div>
	<div id="inputdiv" contenteditable="true" style="width:300px;" class="classtest"></div>
	<button onclick="getFocus()" name="getfocusbtn">获取焦点</button>
		
	
	
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery-1.12.4.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    
    <script src="js/jquery-form.js"></script>
	<script src="js/bootstrap-table.js"></script>
	<script src="js/bootstrap-table-zh-CN.js"></script>
	<script src="js/bootstrap-select.min.js"></script>
	<script src="js/inputGroup-1.1.js"></script>
	<script src="js/jquery.validate.min.js"></script>
	<script src="js/messages_zh.js"></script>
	
	<script src="js/PaperFormController.js"></script>
	<script type="text/javascript">
	$('#inputdiv').focus(function(){
		console.log(111);
	});
	function getFocus(){
		if($(':focus').length==0) {
			alert("暂无获得焦点的元素");
		}else{
			//弹出焦点元素的name
			console.log($(':focus').attr('class'));
		}
	}
	</script>
  </body>
</html>